$peak_file=$ARGV[0];
open(FH,"<$peak_file") or die;
my @in=<FH>;
chomp(@in);
close(FH);
my @out;
my $gtf_file=$peak_file.".peak.gtf";
open(OUT,">$gtf_file");
foreach my $line(@in){
		next if($line=~/^id/);
		my @splitin = split "\t",$line;
		my $chr = $splitin[1];
		#next if($splitin[0]=~/\_/ or $splitin[0]!~/^$chr$/);
		next if $splitin[4] eq "" or $splitin[4] == null;
		my $start = $splitin[4];
	
		my $end = $splitin[4] + 1;
		my $anno = "DEFAULT";
	#	$anno = $splitin[3] if $splitin[3] ne "";
		print OUT "$chr\t$anno\texon\t$start\t$end\t0\t+\t.\tgene_id \"00\"\; transcript_id \"00\"\;\n";
	#	push(@out,"$splitin[0]\t$splitin[3]\t$splitin[4]\texon\t$splitin[5]\t$splitin[6]\n");
}




close(OUT);